package it.aekidna.cleverplatypus.delegate
{
	import mx.rpc.IResponder;

	public class DelegateResponder implements IResponder
	{
		private var resultHandler : Function;
		private var faultHandler : Function;
		
		public function DelegateResponder( 
			inResultHandler : Function,
			inFaultHandler : Function )
		{
			resultHandler = inResultHandler;
			faultHandler = inFaultHandler;
		}

		public function result(data:Object):void
		{
			resultHandler( data );
		}
		
		public function fault(info:Object):void
		{
			faultHandler( info );
		}
		
	}
}